<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title></title>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/pintuer.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/admin.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/js/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
    <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>新建活动</strong></div>
    <div class="body-content">
        <!--注意action值的正确设置-->
        <form method="post" class="form-x" action="../edit_activity">
            <input type="hidden" name="id" value="${activity.id}" />
            <div class="form-group">
                <div class="label">
                    <label>活动名</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${activity.title}" name="title" data-validate="required:请输入活动名" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>活动描述</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${activity.caption}" name="caption" data-validate="required:请输入活动描述" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>活动地点</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${activity.position}" name="position" data-validate="required:请输入活动地点" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>报名开始时间</label>
                </div>
                <div class="field">
                    <input type="date" class="input w50" value="${activity.signUpStartTime}" name="signup_start_time" data-validate="required:请输入报名开始时间" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>报名结束时间</label>
                </div>
                <div class="field">
                    <input type="date" class="input w50" value="${activity.signUpEndTime}" name="signup_end_time" data-validate="required:请输入报名结束时间" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>活动开始时间</label>
                </div>
                <div class="field">
                    <input type="date" class="input w50" value="${activity.startTime}" name="start_time" data-validate="required:请输入活动开始时间" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>活动结束时间</label>
                </div>
                <div class="field">
                    <input type="date" class="input w50" value="${activity.endTime}" name="end_time" data-validate="required:请输入活动结束时间" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>人数需求</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${activity.volunteerMaxCount}" name="max_count" data-validate="required:请输入人数需求" />
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>活动负责人</label>
                </div>
                <div class="field">
                    <select name="leader_id" class="input w50" data-validate="required:请选择活动负责人">
                        <%-- <option value="0">-- 请选择活动负责人 --</option> --%>
                        <c:forEach items="${leaders}" var="leader">
                            <option value="${leader.id}">${leader.username}</option>
                        </c:forEach>
                    </select>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label></label>
                </div>
                <div class="field">
                    <button class="button bg-main icon-check-square-o" type="submit"> 确认修改</button>
                    <button class="button bg-red icon-check-square-o" type="button" onclick="location.href='../activities_list_page'"> 取消</button>
                </div>
            </div>
        </form>
    </div>
</div>

</body></html>
